<template>
  <div>
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <el-tabs tab-position="left">
          <el-tab-pane label="基本信息">
            <h3 style="margin-right: 85%  ">基本信息</h3>
           <div style="text-align: left; padding-left: 30px; width: 60%">
              <br />
              <el-form
                :inline="true"
                :model="formInline"
                class="demo-form-inline"
              >
                <el-form-item label="员工编号：">
                  <el-input v-model="details.pdAuthUser.account"></el-input>
                </el-form-item>
                <el-form-item label="司机名称：">
                  <el-input v-model="details.pdAuthUser.name"></el-input>
                </el-form-item>
                <el-form-item label="所属机构：">
                  <el-input v-model="details.pdAuthUser.pdCoreOrg.name"></el-input>
                </el-form-item>
                <el-form-item label="所属车队：">
                  <el-input v-model="details.pdFleet.name"></el-input>
                </el-form-item>
                <el-form-item label="司机电话：">
                  <el-input v-model="details.pdAuthUser.mobile"></el-input>
                </el-form-item>
                <el-form-item label="司机年龄：">
                  <el-input v-model="details.age"></el-input>
                </el-form-item>
              </el-form>
            </div>
          </el-tab-pane>

          <el-tab-pane label="驾驶证信息">
            <h3 style="margin-right: 85%">驾驶证信息</h3>
            <br>
           <div style="text-align: left; padding-left: 30px; width: 60%">
             <el-form inline="true" model="formInline" class="demo-form-inline">
                <el-form-item label="驾驶证号：">
                  <el-input v-model="details.pdTruck.pdTruckLicense.id"></el-input>
                </el-form-item>
                <el-form-item label="准驾车型：">
                   <div class="block">
                    <el-input v-model="details.pdTruck.pdTruckType.name"></el-input>
                   </div>
                </el-form-item>
                <el-form-item label="领证日期:">
                  <el-input v-model="details.pdTruck.pdTruckLicense.registrationDate"></el-input>
                </el-form-item>
                <el-form-item label="有效日期：">
                   <div class="block">
                    <el-date-picker v-model="details.pdTruck.pdTruckLicense.validityPeriod" type="date" placeholder="选择日期">
                    </el-date-picker>
                   </div>
                </el-form-item>
                <el-form-item label="驾龄：">
                  <el-input v-model="details.drivingAge"></el-input>
                </el-form-item>
                <!-- <el-form-item label="驾驶证类型：">
                   <div class="block">
                    <el-date-picker v-model="details" type="date" placeholder="选择日期">
                    </el-date-picker>
                   </div>
                </el-form-item>
                <el-form-item label="从业资格证：">
                  <el-input v-model="details"></el-input>
                </el-form-item>
                <el-form-item label="入场证信息：">
                   <div class="block">
                    <el-date-picker v-model="details" type="date" placeholder="选择日期">
                    </el-date-picker>
                   </div>
                </el-form-item> -->
             </el-form>
            <br>

            <h3 style="margin-right: auto">图片信息</h3>
             <div>
                <el-upload
                  action="#"
                  list-type="picture-card"
                  :auto-upload="false"
                >
                  <i slot="default" class="el-icon-plus"></i>
                  <div slot="file" slot-scope="{ file }">
                    <img
                      class="el-upload-list__item-thumbnail"
                      :src="file.url"
                      alt=""
                    />
                    <span class="el-upload-list__item-actions">
                      <span
                        class="el-upload-list__item-preview"
                        @click="handlePictureCardPreview1(file)"
                      >
                        <i class="el-icon-zoom-in"></i>
                      </span>
                      <span
                        v-if="!disabled"
                        class="el-upload-list__item-delete"
                        @click="handleDownload1(file)"
                      >
                        <i class="el-icon-download"></i>
                      </span>
                      <span
                        v-if="!disabled"
                        class="el-upload-list__item-delete"
                        @click="handleRemove1(file)"
                      >
                        <i class="el-icon-delete"></i>
                      </span>
                    </span>
                  </div>
                </el-upload>
                <el-dialog :visible.sync="dialogVisible1">
                  <img width="100%" :src="dialogImageUrl" alt="" />
                </el-dialog>
              </div>

            </div>
            </el-tab-pane>

          <el-tab-pane label="车次信息">
            <h3 style="margin-right: 85%">车次信息</h3>
            <br>
            <div style="text-align: left; padding-left: 30px; width: 60%">
                <el-form inline="true" model="formInline" class="demo-form-inline">
                  <el-form-item label="当前使用车辆：">
                  <el-input v-model="details.pdTruck.pdTruckType.name"></el-input>
                </el-form-item>
                <el-form-item label="所属车次：">
                  <el-input v-model="details.pdTransportTrips.name"></el-input>
                </el-form-item>
                </el-form>
            </div>
            </el-tab-pane>
        </el-tabs>
      </div>
      <hr />
      <!-- <el-button @click="save" type="danger">保存</el-button> -->
      <el-button @click="fh">返回</el-button>
    </el-card>
  </div>
</template>
A
<script>
import {
  SavePdTruck,
} from "@/api/wj/Vehicle";
export default {
  data() {
    return {
      details:{},
      dialogImageUrl: "",
      dialogVisible: false,
      disabled: false,
      dialogVisible1:false,
      formInline: "",
    };
  },
  methods: {
    handleRemove(file) {
      console.log(file);
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    handleDownload(file) {
      console.log(file);
    },
    fh(){
        this.$router.go(-1)
    },
    ShowDetails(){
      this.details= JSON.parse(this.$route.params.dataForm);
      console.log(this.details)
    }
  },
   created() {
    this.ShowDetails();
  },
};
</script>

<style>
</style>